package com.coder.service.impl;

import com.coder.common.annotation.MyTransactional;
import com.coder.mapper.UserMapper;
import com.coder.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @MyTransactional
    @Override
    public int insertUser(String name, int age) {
        int result = userMapper.insertUser(name,age);
        int i = 10 / age;
        return result;
    }
}
